const { merge } = require('webpack-merge')
const common = require('./webpack.common.js')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = merge(common, {
  devtool: 'none',
  devServer: {
    hot: true,
    contentBase: 'public',
    compress: true,
    host: 'localhost',
    port: 8080,
    open: false,
    publicPath: '/',
    proxy: {

    }
  },
  plugins: [
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"development"'
      }
    }),
    new webpack.HotModuleReplacementPlugin(),
    new HtmlWebpackPlugin({
      title: 'test',
      template: 'public/index.html',
      templateParameters: {
        BASE_URL: '/'
      },
      inject: true
    })
  ]
})
